import request from '@/utils/request'

// 封装获取部门列表接口API
export const getDepartmentAPI = () => {
  return request({ url: '/company/department' })
}
// 封装获取部门负责人数据API
export function getManagerAPI() {
  return request({
    url: '/sys/user/simple'
  })
}
// 封装新增部门API
export const addDepartmentAPI = (data) => {
  return request({ url: '/company/department', method: 'post', data })
}
// 封装获取部门详情API
export const getDepartmentDetailsAPI = (id) => {
  return request({ url: `/company/department/${id}` })
}
// 封装编辑部门API
export const editDepartmentAPI = (data) => {
  return request({ url: `/company/department/${data.id}`, method: 'put', data })
}
// 封装删除部门API
export const delDepartmentAPI = (id) => {
  return request({ url: `/company/department/${id}`, method: 'delete' })
}

